var _n33;
var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var $2BulletMgr = require("BulletMgr");
var $2BundleManager = require("BundleManager");
var $2DataManager = require("DataManager");
var $2UIManager = require("UIManager");
var $2UserDataManager = require("UserDataManager");
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var def_MainScene = _n33 = /* */function (_cc$Component45) {
  babel_inherits(n, _cc$Component45);
  var _super49 = babel_createSuper(n);
  function n() {
    var _this106;
    babel_classCallCheck(this, n);
    _this106 = _super49.apply(this, arguments);
    _this106.playTime = 0;
    return _this106;
  }
  babel_createClass(n, [{
    key: "onLoad",
    value: function onLoad() {
      this.loadBundle();
      this.schedule(function () {
        $2UserDataManager.default.instance.onlineNum <= 2 && $2UserDataManager.default.instance.onlineTime++;
      }, 1);
      _n33._instance = this;
      $2BulletMgr.default.instance().init();
      if ($2UserDataManager.default.instance.newUser) {
        $2DataManager.default.instance.level = 0;
        $2UIManager.default.instance.openUI("MainUI");
      } else {
        $2UIManager.default.instance.openUI("MenuUI");
      }
    }
  }, {
    key: "loadBundle",
    value: function loadBundle() {
      $2BundleManager.default.instance.loadBundle("Spine").then(function () {
        $2BundleManager.default.instance.preLoadBundleDir("Spine", "", null, null, function () {
          $2DataManager.default.instance.spineLoad = true;
          console.log("Spine加载完成");
        });
      });
      $2BundleManager.default.instance.preLoadBundleDir("Audio", "", cc.AudioClip, null, function () {
        console.log("Audio加载完成");
      });
    }
  }], [{
    key: "instance",
    get() {
      return this._instance;
    }
  }]);
  return n;
}(cc.Component);
def_MainScene._instance = null;
def_MainScene = _n33 = cc__decorate([ccp_ccclass], def_MainScene);
exports.default = def_MainScene;